#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int sentence(int x, int y)
{
	return((-8 + 22) * x - 10 + y / 2);
}
int main()
{
	
	int a = 0;
	int c = 0;
	scanf("%d %d",&a,&c);
	int result = sentence(a,c);
	printf("result=%d",result);
	return 0;
}